﻿using FCDB.Repository;
using FB.Enums;
using FB.Providers.EmployeeInfo;
using FCDB.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FCDB.Repository
{
    class RegularMeetingRepository : LogicBase, ILogic
    {
        public IList<vw_Employees> GetEmployeeByDeparment(string DeparmentID)
        {
            var query = from item in DBHelper.vw_EmployeeInPositions
                        join m in DBHelper.vw_Employees on item.EMPCode equals m.EMPCode

                        where item.DEPTCode == DeparmentID && item.IsPrimary == true && m.RecordState == (int)RecordState.Active
                        select m;

            return query.ToList();
        }
    }
}
